package com.dob.patterns;

import com.dob.model.Account;
import com.dob.model.CurrentAccount;
import com.dob.model.DematAccount;
import com.dob.model.SavingAccount;

public class AccountFactory {
	
	public enum  ACCOUNT_TYPE{SAVING,CURRENT,DEMAT};
	
	
	public static Account createAccount(ACCOUNT_TYPE type){
		switch(type){
		case SAVING: return new SavingAccount();
		case CURRENT: return new CurrentAccount();
		case DEMAT: return new DematAccount();
		default : return null;
		
		}
	}
	
	public void init(Account acc){
		//initialize account
	}

}
